home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d22
/
csap208b.arc
/
CSAP.DOC
< prev
next >
Wrap
Text File
|
1989-10-10
|
7KB
|
157 lines
CSAP - Sort And Pack Directories
Version: 2.01 Date: June 4, 1987
Author: Don A. Williams
********************* N O T I C E *********************
* Contrary to the current trend in MS-DOS software *
* this program, for whatever it is worth, is NOT *
* copyrighted (with the exception of the runtime *
* library from Datalight C)! The program, in whole *
* or in part, may be used freely in any fashion or *
* environment desired. If you find this program to *
* be useful to you, do NOT send any contribution to *
* the author; in the words of Rick Conn, 'Enjoy!' *
* However, if you make any improvements, I would *
* enjoy receiving a copy of the modified source. I *
* can be reached, usually within 24 hours, by *
* messages on any of the Phoenix systems, *
* particularly: *
* *
* Bob's Answering Machine [OPUS] *
* (602) 242-3158 1200/2400 bps *
* The Tool Shop BBS [PCBOARD] [PC-Pursuit] *
* (602) 279-2673 1200/2400 bps *
* The Phoenix TechLine [PCBOARD] *
* (602) 936-3058 1200/2400/9600 bps *
* Technoids Anonymous [PCBOARD] *
* (602) 899-4876 300/1200/2400 bps *
* *
* or on GEnie, mail address: DON-WILL *
* *
* Every effort has been made to avoid error and *
* moderately extensive testing has been performed *
* on this program, however, the author does not *
* warrant it to be fit for any purpose or to be *
* free from error and disclaims any liability for *
* actual or any other damage arising from the use *
* of this program. *
********************************************************
CSAP is a program to sort PC/MS-DOS directories in any of three
orders and to write out the sorted directory. It is a
replacement for my earlier SAP which was written in assembly
language and had a number of nasty bugs! CSAP, from version 2.02 |
up, supports all of the options provided by SAP 3.01, however, |
the manner of specification and the deafaults are different. |
Changes between this documentation and prior versions will be |
indicated by 'change bars', i.e. the character '|' in the right |
margin. |
There is a major exception to the sort. An MS-DOS system disk |
contains two files that MUST be the FIRST two files in the root |
directory. These files contain MSDOS itself and the BIOS for the |
system. Unfortunately, there is no sure way to distinguish these |
files from any other files although usually they have the System |
and/or Hidden attributes and their Extension is 'SYS'. If either |
of the first two files in the root directory have the System and |
Hidden attributes, CSAP will assume that the disk is a system |
disk and will exclude the first two files from the sort. |
USAGE
CSAP [options] [directory_name]
or
CSAP [directory_name] [options]
Both parameters are optional and, if neither is specified, CSAP
will sort the current directory and all elements in the directory
tree below it in ascending order on the "Name" field. As did
SAP, CSAP will sort all subdirectory entry so that they fall
ahead of any file entries. The directory_name parameter, if
supplied, specifies to CSAP the directory with which to start the
sort. Unless otherwise instructed, CSAP will sort that directory
and all directories below it in the directory hierarchy.
If no disk is specified in the path name, CSAP will work on the |
'current' or 'default' disk, the disk shown in the MS-DOS prompt. |
If the first character of the path name, after the optional disk |
specification, is a '\', CSAP will assume that the path starts at |
the root directory. If the path name does not begin with a '\', |
SAP will assume that the path starts at the 'current' directory |
and will prefix the specified path name with that of the current |
directory before using it. |
The options provide the user with a means of controlling the sort
order. They are as follows:
-N Sort on entry Name and Extension(the default). |
-E Sort on entry Extension then Name. |
-D Sort on entry Date/Time.
-S Sort on entry Size.
-I Invert the sort order, i.e sort in descending
order.
-L Sort only one level of the hierarchy. |
-R Report the number of removed "deleted"entries and |
the sector addresses of the directory. |
-P Do not remove "deleted" entries [reversed from SAP]. |
The case and order of the options is not important and they can
be specified individually, i.e.
CSAP -d -i
or combined, i.e.
CSAP -di
EXAMPLES:
Following are some simple examples of the use of CSAP:
1.zzA>CSAP
This form of the CSAP command (with no command line
parameters) will sort the "current" directory of the
"current" or "default" disk (disk A in this example)
and all directories below it in the hierarchy. The
directories will be sorted in name order and
"deleted" entries will be removed.
2. A>CSAP -V
This form of the CSAP command is the same as in 1.
except that CSAP will pause for user confirmation
before sorting each directory.
3. A>CSAP \
This form of the CSAP command will sort the "Root"
directory of the "Current" disk, in ths example, A:\.
All directories on disk A would be sorted.
4. A> CSAP \ -L
This form would, again, sort the "Root" directory of
disk A but the "-L" option would limit the sorting to
just the "Root".
5. A>CSAP \ -R
This form of the CSAP would sort all directories on
disk A and show, for each directory, the relative
sectors occupied by the directory and the number of
"erased" entries removed.
6. A>CSAP \ -DR
This form of the CSAP command will, again, sort all
of the directories on disk A but this time in
Date/Time order. The "R" option would, agan, cause
the relative sectors occupied by each directory and
the number of entries removed to be displayed.